<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <head>
        <th:block th:include="include :: header('修改租户')" />
    </head>
</head>

<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-tenant-edit" th:object="${tenant}">
            <input name="tenantCode"  type="hidden"  th:field="*{tenantCode}" />
            <h4 class="form-header h4">基本信息</h4>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span>租户名称：</label>
                        <div class="col-sm-8">
                            <input name="tenantName" th:field="*{tenantName}" placeholder="请输入租户名称" class="form-control" type="text" required>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span>联系人：</label>
                        <div class="col-sm-8">
                            <input name="contactMan" th:field="*{contactMan}" placeholder="请输入联系人" class="form-control" type="text"  required>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span>手机号码：</label>
                        <div class="col-sm-8">
                            <input name="contactNumber" th:field="*{contactNumber}"  placeholder="请输入联系手机号码" class="form-control" type="text" required>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-xs-4 control-label">地址：</label>
                        <div class="col-xs-8">
                            <input name="address" th:field="*{address}" maxlength="255" class="form-control" rows="3"></input>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-xs-2 control-label">备注：</label>
                        <div class="col-xs-10">
                            <textarea name="remark" maxlength="500" class="form-control" rows="3">[[*{remark}]]</textarea>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script>
        var prefix = ctx + "system/tenant";

        function submitHandler() {
            if ($.validate.form()) {
                var data = $("#form-tenant-edit").serializeArray();
                $.operate.save(prefix + "/edit", data);
            }
        }

    </script>
</body>
</html>